<%@ page pageEncoding="UTF-8" %>
<%@ include file="../common/IncludeTop.jsp"%>

<div id="BackLink">
    <a href="main">返回主菜单</a>
</div>

<div id="Catalog">

    <h2>我的订单</h2>

    <table>
        <tr>
            <th>订单ID</th>
            <th>时间</th>
            <th>总价</th>
        </tr>

        <c:if test="${sessionScope.orderList.size() == 0}">
            <tr>
                <td colspan="8"><i>您还没有订单</i></td>
            </tr>
        </c:if>

        <c:forEach var="order" items="${sessionScope.orderList}">
            <tr>
                <td><a href="viewOrder?orderId=${order.orderId}">${order.orderId}</a></td>
                <td>${order.orderDate}</td>
                <td><fmt:formatNumber value="${order.totalPrice}" pattern="¥#,##0.00" /></td>
            </tr>
        </c:forEach>

    </table>

</div>

</div>

<%@ include file="../common/IncludeBottom.jsp"%>